FROM alpine:3.10.3

RUN apk add --no-cache curl tar openjdk8-jre && \
    curl -vskS http://edas.oss-cn-hangzhou.aliyuncs.com/edas-res/edas-lightweight-server-1.0.0.tar.gz|tar -C /opt -xvzf - && \
    echo "sh /opt/edas-lightweight/bin/startup.sh ; tail -f /opt/edas-lightweight/logs/start.out" > /opt/run.sh

ENV JAVA_HOME /usr/lib/jvm/java-1.8-openjdk
ENV PATH $JAVA_HOME/bin:$PATH

ENTRYPOINT ["sh","/opt/run.sh"]

